<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2017 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: xiaoying <360963804@qq.com>
// +----------------------------------------------------------------------
namespace plugins\wx_login;

use cmf\lib\Plugin;
use think\Db;
use think\Request;


class WxLoginPlugin extends Plugin
{

    public $info = [
        'name' => 'WxLogin', //插件名字
        'title' => '微信登录插件', //标题
        'description' => '微信登录插件', //描述
        'status' => 0, //关
        'author' => '小影', //作者
        'version' => '1.0' //版本号
    ];

    public $hasAdmin = 0; //插件是否有后台管理界面

    // 插件安装
    public function install()
    {
        return true; //安装成功返回true，失败false
    }

    // 插件卸载
    public function uninstall()
    {
        return true; //卸载成功返回true，失败false
    }

    //实现的wxlogin钩子方法
    public function wxLogin()
    {
        $config = $this->getConfig();
        $this->assign($config);
        echo $this->fetch('index');
    }
}
